<?php if($managed_blog||$loc=='home'):?>

<div id="postNav">
<a style="float:left;" href="http://localhost/MyMicroBlog/index.php/user/info/<?php echo $cur_user['uid']?>"><img src="<?php echo $this->avatarlib->url($cur_user['uid'])?>" height="64" width="64"/></a>
<div class="well" style="width:520px;float:right;">
<table>
<tr>
<td style="text-align:center" width="100px"><a href="#" onclick="postBlog('text')"><img src="<?php echo base_url('public/image/feed/1.png')?>"/></a>
</td>
<td style="text-align:center" width="100px"><a href="#" onclick="postBlog('img')"><img src="<?php echo base_url('public/image/feed/2.png')?>"/></a>
</td>
<td style="text-align:center" width="100px"><a href="#" onclick="postBlog('link')"><img src="<?php echo base_url('public/image/feed/3.png')?>"/></a>
</td>
<td style="text-align:center" width="100px"><a href="#" onclick="postBlog('music')"><img src="<?php echo base_url('public/image/feed/4.png')?>"/></a>
</td>
<td style="text-align:center" width="100px"><a href="#" onclick="postBlog('vedio')"><img src="<?php echo base_url('public/image/feed/5.png')?>"/></a>
</td>
</tr>
<tr>
<td style="text-align:center" width="100px">Text</td>
<td style="text-align:center" width="100px">Image</td>
<td style="text-align:center" width="100px">Link</td>
<td style="text-align:center" width="100px">Audio</td>
<td style="text-align:center" width="100px">Video</td>
</tr>
</table>
</div>
</div>
<p style="clear:both"></p>

<hr/>
<?php endif;?>
<!-- feed area -->
<?php if (!isset($feeds)){$feeds=array();}?>
	<?php foreach ($feeds as $feed):?>
	
<a name='f<?php echo $feed['pid']?>' id='f<?php echo $feed['pid']?>'></a>
<a href="http://localhost/MyMicroBlog/index.php/user/info/<?php echo $cur_user['uid']?>">
<img src="<?php echo $this->avatarlib->url($cur_user['uid'])?>" height="64" width="64"/>
</a>
	<div style="float:right;padding:5px 10px;width:540px;" 
	class = "well feed-well" id = "feed-<?php echo $feed['pid']?>">
		<?php $feed['show_bname'] = ($loc=='home'||$loc=='like'||$loc=='discover')?>
		<div id = 'feed-area-<?php echo $feed['pid'];?>'>
			<?php $this->load->view('feed/item',$feed); ?>
		</div>
		
		<!-- op btn start  -->

			<div class = 'row' id = "op-feed-<?php echo $feed['pid']?>">
			<div class = "span3 offset8">
				<a class = "btn btn-mini btn-like <?php if ($feed['islike']):?>disabled<?php endif;?>"
					
					id = "btn-like-<?php echo $feed['pid']?>"
					<?php if (!$feed['islike']):?>
						onClick = "like_feed(<?php echo $feed['pid']?>
					<?php endif;?>
					)">
					<i class = "icon-heart"></i><?php echo $feed['num_likes']?></a>
				<a class = "btn btn-mini btn-share" id = "btn-share-<?php echo $feed['pid']?>"
					onClick = 'show_share_modal(<?php echo $feed['pid']?>)'>
					<i class = "icon-share-alt"></i><?php echo $feed['num_share']?></a>
				<a class = "btn btn-mini btn-reply" id = "btn-reply-<?php echo $feed['pid']?>"
					onClick = "toggle_reply('<?php echo $feed['pid']?>')">
					<i class = "icon-comment"></i><span><?php echo $feed['num_reply'];?></span></a>
					
				<!-- //不显示'删除按钮'	
				<?php if ($feed['author']['uid']==$this->session->userdata('user_id')):?>
				<a class = "btn btn-mini btn-delete" id = "btn-delete-<?php echo $feed['pid']?>"
					onClick = "delete_feed(<?php echo $feed['pid']?>)">
					<i class = "icon-trash"></i></a>
				<?php endif;?>
				-->
				
			</div>
			</div>
		<!-- op btn end -->
		
		<div class="reply-ctn" id="reply-feed-<?php echo $feed['pid']?>">
			
		</div>		
		</div>
		<p style="clear:both"></p>
	<?php endforeach;?>
	
	<?php if(!count($feeds)):?>
		
		<div>还没有内容哦!</div>
	<?php endif;?>
<!-- end of feed area -->
